package com.cosmos.codegen.base.domain;

import java.util.HashMap;
import java.util.Map;

/**
 * 数据库字段类型与java类型对应类
 * 
 * @date 2016-3-22 10:02:24
 * @version 1.0
 * @author zhuzhaoyong
 *
 */
public class DBTypeMapper {

	public static Map<String, String> TYPE_MAPPER = new HashMap<String, String>();
	
	static {
		TYPE_MAPPER.put("VARCHAR", "java.lang.String");
		TYPE_MAPPER.put("VARCHAR2", "java.lang.String");
		
		TYPE_MAPPER.put("TINYINT", "java.lang.Integer");
		TYPE_MAPPER.put("SMALLINT", "java.lang.Integer");
		TYPE_MAPPER.put("MEDIUMINT", "java.lang.Integer");
		TYPE_MAPPER.put("INT", "java.lang.Integer");
		TYPE_MAPPER.put("INTEGER", "java.lang.Integer");
		TYPE_MAPPER.put("BIGINT", "java.lang.Integer");
		
		TYPE_MAPPER.put("DOUBLE", "java.lang.Double");
		TYPE_MAPPER.put("DECIMAL", "java.lang.Double");
		TYPE_MAPPER.put("NUMBERIC", "java.lang.Double");
		TYPE_MAPPER.put("NUMBER", "java.lang.Double");

		TYPE_MAPPER.put("FLOAT", "java.lang.Float");
		
		TYPE_MAPPER.put("CHAR", "java.lang.Character");
		
		TYPE_MAPPER.put("DATE", "java.util.Date");
		TYPE_MAPPER.put("DATETIME", "java.util.Date");
		
	}
}
